Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repl output after .pseudoToNative changes #455

Merged
merged 1 commit into from
Mar 5, 2021
Merged

Fix repl output after .pseudoToNative changes #455

merged 1 commit into from
Mar 5, 2021

Conversation

cpcallen
Copy link
Collaborator

@cpcallen cpcallen commented Mar 4, 2021

In PR #450 Interpreter.prototype.pseudoToNative was modified to make
the JSON.stringify builtin behave more correctly (per ES5.1 spec).

Unfortunately this meant that in repl any expression that yielded
a function would be shown as having value undefined.

Fix repl so that if the expression evaluates to a function that
function is printed. (It will still hide methods, as JSON.stringify
does. But this is better than before, and perfecting repl is not
a priority at the moment.)

In PR #450 Interpreter.prototype.pseudoToNative was modified to make
the JSON.stringify builtin behave more correctly (per ES5.1 spec).

Unfortunately this meant that in repl any expression that yeilded
a function would be shown as having value undefined.

Fix repl so that if the expression evaluates to a function that
function is printed.  (It will still hide methods, as JSON.stringify
does.  But this is better than before, and perfecting repl is not
a priority at the moment.)
@cpcallen cpcallen requested a review from NeilFraser March 4, 2021 16:58
@cpcallen cpcallen merged commit fc150e2 into master Mar 5, 2021
@cpcallen cpcallen deleted the repl-fix branch March 5, 2021 12:49
cpcallen added a commit that referenced this pull request Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants